package com.asset.salesforce.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.asset.salesforce.dao.InvoiceTaxDaoImpl;
import com.asset.salesforce.domain.InvoiceTax;

@Service
@Transactional(readOnly=true)
public class InvoiceTaxService {
	@Autowired
	private InvoiceTaxDaoImpl invoiceTaxDaoImpl;
	
	@Transactional(readOnly=false)
	public void addTax(InvoiceTax invoiceTax) {
		invoiceTaxDaoImpl.add(invoiceTax);
	}	
	@Transactional(readOnly=true)
	public List<InvoiceTax> getAllTaxes() {
		return invoiceTaxDaoImpl.getAll(new InvoiceTax());
	}
	@Transactional(readOnly=true)
	public InvoiceTax getTaxById(Integer id) {
		return invoiceTaxDaoImpl.getById(id, new InvoiceTax());
	}

}
